﻿#pragma once
#include <QObject>

class QModbusTcpServer;
class TestActions: public QObject {
	Q_OBJECT
public:
	TestActions(QObject *parent = nullptr);
	~TestActions();
	Q_INVOKABLE void connectDevice();
	Q_INVOKABLE void disconnectDevice();
	Q_INVOKABLE void clearMaps();
	Q_INVOKABLE void gripperBackward(bool run);
	Q_INVOKABLE void gripperForward(bool run);
	Q_INVOKABLE void gripperLeftward(bool run);
	Q_INVOKABLE void gripperRightward(bool run);
	Q_INVOKABLE void gripperStrech(bool run);
	Q_INVOKABLE void gripperShrink(bool run);
	Q_INVOKABLE void waitPush(bool run);
	Q_INVOKABLE void pushFrameUpward(bool run);
	Q_INVOKABLE void pushFrameDownward(bool run);
	Q_INVOKABLE void pushFrameLeftward(bool run);
	Q_INVOKABLE void pushFrameRightward(bool run);
	Q_INVOKABLE void palletRightward(bool run);
	Q_INVOKABLE void palletLeftward(bool run);
	Q_INVOKABLE void palletUpward(bool run);
	Q_INVOKABLE void palletDownward(bool run);
	Q_INVOKABLE void pushDrillrod(bool run);
	Q_INVOKABLE void pushDrill(bool run);
	Q_INVOKABLE void pullDrill(bool run);
	Q_INVOKABLE void drillFrameUnwind(bool run);
	Q_INVOKABLE void drillFrameShrink(bool run);
	Q_INVOKABLE void drillFrameUpward(bool run);
	Q_INVOKABLE void drillFrameDownward(bool run);
	Q_INVOKABLE void frontFolderClose(bool run);
	Q_INVOKABLE void frontFolderOpen(bool run);
	Q_INVOKABLE void backFolderClose(bool run);
	Q_INVOKABLE void backFolderOpen(bool run);
	Q_INVOKABLE void startGripper(bool run);
signals:
	void logs(const QString msg);
private:
	QModbusTcpServer* m_server = nullptr;
};
